package com.zjeav.lingjiao.base.adapter;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.zjeav.lingjiao.R;
import com.zjeav.lingjiao.base.baseBean.Book;
import com.zjeav.lingjiao.base.baseBean.Find;

public class FindAdapter extends BaseQuickAdapter<Find, BaseViewHolder> {
    private Context context;

    public FindAdapter(Context context) {
        super(R.layout.find_item);
        this.context = context;
    }

    @Override
    protected void convert(BaseViewHolder helper, Find item) {
        helper.setText(R.id.time_txt,item.getReleaseTime());
        helper.setText(R.id.find_title_txt, item.getTitle());
        ImageView imageView = helper.getView(R.id.find_img);
        Glide.with(context)
                .load(item.getCover())
                .into(imageView);
    }
}
